package cfca.payment.socket;

import java.net.ServerSocket;
import java.net.Socket;


public class SocketServer {

	public String serverInitialization() {

		try {
			ServerSocket serversocket = new ServerSocket(8888);
			Socket socket = null;
			System.out.println("aaaa");
			while (true) {
				System.out.println("aaaa");

				socket = serversocket.accept();
				System.out.println("aaaa");

				SocketThread loginThread = new SocketThread();
				
				loginThread.start();
			}
		} catch (Exception e) {

		}
		return "over";
	}
	// Socket socket = serversocket.accept();
	// InputStream is = socket.getInputStream() ;
	// OutputStream os = socket.getOutputStream();
	// BufferedReader br = new BufferedReader(new InputStreamReader(is));
	// String info = null ;
	// System.out.println("qqqq");
	// while(!((info=br.readLine())==null)){
	// System.out.println("���Ƿ�����������ϢΪ:"+info);
	// }
	//
	// String reply = "��ӭ��";
	// os.write(reply.getBytes());
	// socket.shutdownInput();
	//
	// br.close();
	// os.close();
	// is.close();
	// socket.close();
	// System.out.println("111isInputShutdown"+socket.isInputShutdown());
	// System.out.println("111isOutputShutdown"+socket.isOutputShutdown());
	// System.out.println("111isClosed"+socket.isClosed());

}
